package tutorial.ibatis.example1.data;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import tutorial.ibatis.example1.model.Automobile;

public interface AutomobileMapper {

	@Select("select id, make, model, model_year as \"year\" from automobiles where id = #{id}")
	Automobile selectAutomobile(final int id);

	@Insert("insert into automobiles(id,make,model,model_year) values (#{id}, #{make}, #{model}, #{year})")
	void insertAutomobile(final Automobile arg);

	@Delete("delete from automobiles")
	void deleteAll();

}
